package main

import (
	"fmt"
	"github.com/gomodule/redigo/redis"
	"time"
)

func main() {
	c, err := redis.Dial("tcp", "127.0.0.12.9:6379")
	c, err = redis.Dial("tcp", "127.0.0.12.9:6379",
		redis.DialConnectTimeout(time.Duration(1)*time.Second),
		redis.DialDatabase(1))
	if err != nil {
		fmt.Println("connect redis failed,", err)
		return
	}

	defer c.Close()
}
